<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单详情</title>
    <link th:href="@{/css/index.css}" rel="stylesheet"/>
    <link rel="stylesheet" th:href="@{/css/orderDo.css}"/>
</head>
<body>
<th:block th:insert="~{header :: head}"/>
<div class="container">
    <h1>订单详情</h1>

    <!-- 订单详细信息 -->
    <div class="order-box">
        <div class="order-summary">
            <p>订单编号：<strong th:text="${order.getOrderid()}"></strong></p>
            <p>演唱会：<strong th:text="${concert.getConcertname()}"></strong></p>
            <p>时间：<strong th:text="${#dates.format(concert.concertdate, 'yyyy-MM-dd')}"></strong></p>
            <p>地点：<strong th:text="${concert.venue}"></strong></p>
            <p>票档：<strong th:text="${ticket.getTickettype()}"></strong></p>
            <p>座位：<strong th:text="${seat.getSeatarea()} + ${seat.getSeatnumber()}"></strong></p>
            <p>总价：<strong th:text="${ticket.getPrice()}"></strong> 元</p>
            <p th:if="${order.getOrdertime()} != null">下单时间：<strong th:text="${#dates.format(order.getOrdertime(), 'yyyy-MM-dd HH:mm:ss')}"></strong></p>
            <p th:if="${order.getPaymenttime()} != null">支付时间：<strong th:text="${#dates.format(order.getPaymenttime(), 'yyyy-MM-dd HH:mm:ss')}"></strong></p>
        </div>

        <!-- 支付状态 -->
        <div class="payment-status">
            <p>支付状态：<strong th:text="${order.getOrderstatus() == 0 ? '未支付' : '已支付'}"></strong></p>
        </div>

        <!-- 用户操作 -->
        <div class="user-actions">
            <a href="index" class="back-button">返回首页</a>
            <a th:if="${order.getOrderstatus() == 1}" href="orderList" class="orders-button">查看我的订单</a>
        </div>
    </div>
</div>
<th:block th:insert="~{footer :: foot}"/>
</body>
</html>
